<h1>Listing receipts</h1>

<table>
  <tr>
    <th>Store</th>
    <th>Date</th>
    <th>Time</th>
  </tr>

<% for receipt in @receipts %>
  <tr>
    <td><%=h receipt.store.company.name %></td>
    <td><%=h receipt.rDate.to_s %></td>
    <td><%=h receipt.rTime.to_s %></td>
    <td><%= link_to image_tag("view.gif"), receipt %></td>
    <td><%= link_to image_tag("edit.gif"), edit_receipt_path(receipt) %></td>
    <td><%= link_to image_tag("delete.gif"), receipt, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New receipt', new_receipt_path %>
